package gold.digger;

import java.util.ArrayList;
import java.util.Arrays;
import java.util.List;

/**
 * Created by fanzhenyu02 on 2020/6/27.
 * common problem solver template.
 */
public class LC1877 {
    public long startExecuteTime = System.currentTimeMillis();


    class Solution {
        public int minPairSum(int[] nums) {
            int n = nums.length;
            int res = 0;
            Arrays.sort(nums);
            for (int i = 0; i < n / 2; ++i) {
                res = Math.max(res, nums[i] + nums[n - 1 - i]);
            }
            return res;
        }
    }


    public void run() {
        Solution solution = new Solution();
        List<Integer> list = new ArrayList<>();
        System.out.println(solution.toString());
    }

    public static void main(String[] args) throws Exception {
        LC1877 an = new LC1877();
        an.run();

        System.out.println("\ncurrent solution total execute time: " + (System.currentTimeMillis() - an.startExecuteTime) + " ms.");
    }
}
